package com.tl.satoken.domain.entity;

public enum MBTISquare {
    INTJ("建筑师", "内向直觉思维判断"),
    INTP("逻辑学家", "内向直觉思维感知"),
    ENTJ("指挥官", "外向直觉思维判断"),
    ENTP("辩论家", "外向直觉思维感知"),
    INFJ("提倡者", "内向直觉情感判断"),
    INFP("调停者", "内向直觉情感感知"),
    ENFJ("主人公", "外向直觉情感判断"),
    ENFP("竞选者", "外向直觉情感感知"),
    ISTJ("物流师", "内向感觉思维判断"),
    ISFJ("守卫者", "内向感觉情感判断"),
    ESTJ("总经理", "外向感觉思维判断"),
    ESFJ("执政官", "外向感觉情感判断"),
    ISTP("鉴赏家", "内向感觉思维感知"),
    ISFP("探险家", "内向感觉情感感知"),
    ESTP("企业家", "外向感觉思维感知"),
    ESFP("娱乐家", "外向感觉情感感知");

    private final String displayName;
    private final String description;

    public static MBTISquare fromString(String type) {
        if (type != null && !type.trim().isEmpty()) {
            try {
                return valueOf(type.toUpperCase());
            } catch (IllegalArgumentException var2) {
                return null;
            }
        } else {
            return null;
        }
    }

    public static String[] getAllTypes() {
        MBTISquare[] values = values();
        String[] types = new String[values.length];

        for(int i = 0; i < values.length; ++i) {
            types[i] = values[i].name();
        }

        return types;
    }

    public String getDisplayName() {
        return this.displayName;
    }

    public String getDescription() {
        return this.description;
    }

    private MBTISquare(final String displayName, final String description) {
        this.displayName = displayName;
        this.description = description;
    }
}

